package com.itheima.easyexcel;

import com.alibaba.excel.EasyExcelFactory;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.metadata.Sheet;
import com.alibaba.excel.metadata.Table;

import java.io.*;
import java.util.ArrayList;
import java.util.List;

public class EasyExcelTest1 {
    public static void main(String[] args) {
        System.out.println("====读文件====");
        //待解析的文件路径
        String filePath1 = "D:\\JavaPractise\\CRM_PRJ\\2100clues.xlsx";
        //第一个sheet，从第0行开始读取数据
        Sheet sheet1 = new Sheet(1,0);
        try {
            //得到解析的数据
            List<Object> data = EasyExcelFactory.read(new FileInputStream(new File(filePath1)),sheet1);
            //打印
            for (Object d : data){
                System.out.println(d);
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }
}
